;;;;;;;;;;;;;;;;;;;;  git version control  ;;;;;;;;;;;;;;;;;;;;
(require 'magit)
(autoload 'magit-status "magit" nil t)
(set 'magit-process-connection-type nil)
;;;;;;;;;;;;;;;;;;;;  flymake  ;;;;;;;;;;;;;;;;;;;;
(setq flymake-gui-warnings-enabled nil)

;;;;;;;;;;;;;;;;;;;;  android setting  ;;;;;;;;;;;;;;;;;;;;
(require 'android-mode)
(setq android-mode-sdk-dir emax-android-sdk-dir)

;;;;;;;;;;;;;;;;;;;;  gdb  ;;;;;;;;;;;;;;;;;;;;
(setq gdb-all-registers t)
(setq gdb-enable-debug t)
(setq gdb-show-changed-values t)
(setq gdb-show-main t)
(setq gdb-use-separate-io-buffer t)
(setq gud-bashdb-command-name "bashdb")
(setq gud-tooltip-mode t)

;;;;;;;;;;;;;;;;;;;;  geben  ;;;;;;;;;;;;;;;;;;;;
(setq geben-dbgp-default-port 19999)

;;;;;;;;;;;;;;;;;;;;  ros setting  ;;;;;;;;;;;;;;;;;;;;
(let*((ros (shell-command-to-string "which rospack"))
      (file (substring ros 0 -1)))  
  (when (file-exists-p file)
    (progn
      (require 'rosemacs)
      (invoke-rosemacs)
      (global-set-key "\C-x\C-r" ros-keymap))))

;;;;;;;;;;;;;;;;;;;;  yasnippet  ;;;;;;;;;;;;;;;;;;;;
(require 'yasnippet)
(when (equal noninteractive nil)
  (progn
    (yas/initialize)
    (yas/load-directory emax-yas-snippets)))

;;;;;;;;;;;;;;;;;;;;  slime  ;;;;;;;;;;;;;;;;;;;;
(load "slime-autoloads")
(eval-after-load "slime"
  '(progn
     (when (fboundp 'w3m-browse-url)
       (setq browse-url-browser-function '(("hyperspec" . w3m-browse-url)
                                           ("." . browse-url-default-browser))))
     (setq slime-lisp-implementations
           '((sbcl ("/usr/bin/sbcl") :coding-system utf-8-unix)
             (clisp  ("/usr/bin/clisp") :coding-system utf-8-unix)
             ;; (cmucl ("cmucl" "-quiet"))
             ))
     (global-set-key "\C-cs" 'slime-selector)
     (setq inferior-lisp-program "lisp")
     (slime-setup '(slime-fancy slime-asdf slime-banner))
     (setq slime-complete-symbol*-fancy t)
     (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)))


(setq flymake-allowed-file-name-masks (quote (("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init)
                                              ("\\.xml\\'" flymake-xml-init)
                                              ("\\.html?\\'" flymake-xml-init)
                                              ("\\.cs\\'" flymake-simple-make-init)
                                              ("\\.p[ml]\\'" flymake-perl-init)
                                              ("\\.php[345]?\\'" flymake-php-init)
                                              ("\\.h\\'" flymake-master-make-header-init flymake-master-cleanup)
                                              ("\\.java\\'" flymake-simple-make-java-init flymake-simple-java-cleanup)
                                              ("\\.tex\\'" flymake-simple-tex-init)
                                              ("\\.idl\\'" flymake-simple-make-init))))

(setq global-semantic-idle-scheduler-mode nil)
(setq global-semanticdb-minor-mode nil)
(setq semantic-default-submodes nil)
